package user;

import bookList.BookList;
import operations.Operations;

/**
 * 用户类
 *
 * @author CY
 * @date 2022 /08/09 21:55
 */
public abstract class User {
    protected Operations[] ots;
    private String name;

    /**
     * Instantiates a new User.
     *
     * @param name the name
     */
    public User(String name) {
        this.name = name;
    }

    /**
     * Gets name.
     *
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * Sets name.
     *
     * @param name the name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Menu int.
     *
     * @return the int
     */
    public abstract int menu();

    public void doOperations(BookList bookList, int choices) {
        ots[choices].work(bookList);
    }

}
